﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace HAZ.ConnectionFactory
{
    public interface IDBConnector
    {
        DataTable DataTableFromQuery(StringBuilder sQuery);
        DataTable DataTableFromQuery(string        sQuery);

        int ExecuteQuery(object value);

        #region CRUD
        // CRUD default, base to use on all sistem

        /// <summary>
        /// Execute query, and return 
        /// </summary>
        /// <param name="sQuery"></param>
        /// <returns></returns>
        DataTable Select(StringBuilder sQuery);
        DataTable Select(string        sQuery);

        int Delete(params object[] filter);
        int Update(object[] data, params object[] filter);
        int Insert(object[] field, object[] data);
        #endregion
    }
}
